<!doctype html public "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>FixBrokenChromaUpsampling Avisynth Filter</title>
<link rel="stylesheet" type="text/css" href="../../avisynth.css">
</head>
<body>
<h2><a name="FixBrokenChromaUpsampling"></a>FixBrokenChromaUpsampling</h2>
<p><code>FixBrokenChromaUpsampling </code>(<var>clip</var>)</p>
<p>
The free Canopus DV Codec v1.00 upsamples the chroma channels incorrectly
(although newer non-free versions appear to work fine).  Chroma is
<a href="http://forum.doom9.org/showthread.php?p=180052#post180052">duplicated from the other
field</a>, resulting in the famous <a href="../advancedtopics/sampling.htm">Chroma Upsampling
Error</a>.<br>
<br>
<code>FixBrokenChromaUpsampling </code> filter compensates for it. You should
put this after AviSource if you're using the above Canopus DV codec. Old
versions of the DirectShow based MS DV codec also might have this problem (the
one that comes with DirectX7 (but i need to check this), the one that comes
with DirectX8/9 works fine).<br>
<br>
The Canopus DV codec swaps the chroma of the middle 2 for each group of 4 lines:</p>
<table border="1" width="40%">
  <tr>
    <td width="50%">frame_correct</td>
    <td width="50%">frame_Canopus</td>
  </tr>
  <tr>
    <td width="50%">line 1</td>
    <td width="50%">line 1</td>
  </tr>
  <tr>
    <td width="50%">line 2</td>
    <td width="50%">line 3</td>
  </tr>
  <tr>
    <td width="50%">line 3</td>
    <td width="50%">line 2</td>
  </tr>
  <tr>
    <td width="50%">line 4</td>
    <td width="50%">line 4</td>
  </tr>
  <tr>
    <td width="50%">line 5</td>
    <td width="50%">line 5</td>
  </tr>
  <tr>
    <td width="50%">line 6</td>
    <td width="50%">line 7</td>
  </tr>
  <tr>
    <td width="50%">line 7</td>
    <td width="50%">line 6</td>
  </tr>
  <tr>
    <td width="50%">line 8</td>
    <td width="50%">line 8</td>
  </tr>
</table>
<p>For each group of 4 lines <code>FixBrokenChromaUpsampling </code> corrects
this by swapping the chroma of the middle 2 back:
<p><kbd>$Date: 2005/11/08 12:37:33 $</kbd></p>
<FORM>
<INPUT TYPE="Button" VALUE="Back"
onClick="history.go(-1)">
</form>
</body>
</html>
